package com.bawei.http
import okhttp3.OkHttpClient
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

object RetrofitManager {

    /**
     * 获取Retrofit对象
     */
    fun getRetrofit(okHttpClient: OkHttpClient): Retrofit{
        var builder = Retrofit.Builder()
        builder.apply {
            baseUrl(BuildConfig.BASE_URL)
            client(okHttpClient)
            addConverterFactory(GsonConverterFactory.create())
        }
        return builder.build()
    }


}